<?php
require_once 'Zend/Validate/Interface.php';

class Lead_Validate_NotNull implements Zend_Validate_Interface
{
    /**
     * Array of validation failure messages
     *
     * @var array
     */
    protected $_messages = array();
    
    
    
    public function isValid($value)
    {
        $this->_messages = array();
        if (is_null($value)) {
            $this->_messages[] = "'$value' is null";
            return false;
        }
        return true;
        
    }
    
    
    
    /**
     * Defined by Zend_Validate_Interface
     *
     * Returns array of validation failure messages
     *
     * @return array
     */
    public function getMessages()
    {
        return $this->_messages;
    }
    
    
    public function getErrors()
    {
        return $this->_messages;
    }
    
    
    
}

